home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / The World of Computer Software.iso / tspa3155.zip / TSUNTH.TST < prev    next >
Text File  |  1992-08-23  |  3KB  |  145 lines

  1. (* This is a test program for the TSUNTH.TPU unit 25-Feb-89
  2.    Updated 21-Mar-90, 23-Jul-90, 1-Aug-90, 5-Jan-91, 21-Jul-91,
  3.            24-Nov-91, 23-Aug-92 *)
  4.  
  5. uses Dos, TSUNTH;
  6.  
  7. procedure LOGO;
  8. begin
  9.   writeln;
  10.   writeln ('TSUNTH unit test by Prof. Timo Salmi, 23-Aug-92');
  11.   writeln ('University of Vaasa, Finland, ts@uwasa.fi');
  12.   writeln;
  13. end;  (* logo *)
  14.  
  15. (* Testing if graftabl is loaded *)
  16. procedure TEST1;
  17. begin
  18.   if GRTABLFN then
  19.      writeln ('GRAFTABL has been loaded')
  20.    else
  21.      writeln ('GRAFTABL has not been loaded');
  22. end;  (* test1 *)
  23.  
  24. (* Is a math coprocessor present *)
  25. procedure TEST4;
  26. begin
  27.   if MATHCOFN then
  28.      writeln ('A math coprocessor is present')
  29.    else
  30.      writeln ('No math coprocessor present');
  31. end;  (* test4 *)
  32.  
  33. (* Number of serial ports *)
  34. procedure TEST5;
  35. begin
  36.   writeln ('Number of serial ports ', RS232FN);
  37.   Flush (output);
  38. end;  (* test5 *)
  39.  
  40. (* Number of parallel ports *)
  41. procedure TEST6;
  42. begin
  43.   writeln ('Number of parallel ports ', PARPORFN);
  44.   Flush (output);
  45. end;  (* test6 *)
  46.  
  47. (* Country code *)
  48. procedure TEST7;
  49. begin
  50.   writeln ('The country code is ', COUNTRFN);
  51.   Flush (output);
  52. end;  (* test7 *)
  53.  
  54. (* Processor chip type *)
  55. procedure TEST8;
  56. begin
  57.   writeln ('The processor chip is ', CHIPFN);
  58.   Flush (output);
  59. end;  (* test8 *)
  60.  
  61. (* Get ROM BIOS version *)
  62. procedure TEST9;
  63. begin
  64.   writeln ('The ROM BIOS version (date) is ', ROMDTEFN);
  65.   Flush (output);
  66. end;  (* test9 *)
  67.  
  68. (* Is an enhanced keyboard present *)
  69. procedure TEST10;
  70. begin
  71.   if ISENHAFN then
  72.     writeln ('Enhanced keyboard')
  73.   else
  74.     writeln ('Not an enhanced keyboard');
  75. end;  (* test10 *)
  76.  
  77. (* Last drive, and interleave values *)
  78. procedure TEST11;
  79. var lastdrive  : char;
  80.     interleave : byte;
  81.     ch         : char;
  82. begin
  83.   lastdrive := LASTDRFN;
  84.   writeln ('The last drive on this system is ', lastdrive);
  85.   if lastdrive > 'B' then
  86.     for ch := 'C' to lastdrive do
  87.       writeln ('Drive ', ch, ' interleave is ', INTERLFN (ch));
  88.   writeln;
  89.   for ch := 'A' to lastdrive do
  90.     writeln ('Drive ', ch, ' number of FATs is ', FATSFN (ch));
  91. end;  (* test11 *)
  92.  
  93. (* Show date and time formats of your configuration *)
  94. procedure TEST13;
  95. begin
  96.   writeln ('The country-dependent date format is ', DATEFMFN);
  97.   writeln ('The country-dependent time format is ', TIMEFMFN);
  98. end;  (* test13 *)
  99.  
  100. procedure TEST14;
  101. const drive = 'A';
  102. begin
  103.    writeln ('Number of cylinders on ', drive, ', is ', NRCYLFN(drive));
  104. end;  (* test14 *)
  105.  
  106. (* Test whether a mouse is available *)
  107. procedure TEST15;
  108. begin
  109.   write ('MOUSTAFN: ');
  110.   case MOUSTAFN of
  111.     0 : writeln ('No mouse & driver detected');
  112.     1 : writeln ('Mouse detected, with other than two buttons');
  113.     2 : writeln ('Mouse detected, with two buttons');
  114.     3 : writeln ('Mouse Systems or Logitech mouse detected, EEEEEK!!!!');
  115.     4 : writeln ('Mouse status unknown');
  116.   end;
  117. end;  (* test15 *)
  118.  
  119. (* Simple false/true test whether a mouse is available *)
  120. procedure TEST16;
  121. begin
  122.   write ('ISMOUSFN: ');
  123.   case ISMOUSFN of
  124.     true  : writeln ('Mouse detected');
  125.     false : writeln ('No mouse detected');
  126.   end;
  127. end;  (* test16 *)
  128.  
  129. (* Main program *)
  130. begin
  131.   LOGO;
  132.   TEST4;
  133.   TEST5;
  134.   TEST6;
  135.   TEST7;
  136.   TEST8;
  137.   TEST9;
  138.   TEST10;
  139.   TEST15;
  140.   {}
  141.   {... if you want the rest of the tests, just include them ...}
  142.   {}
  143.   write ('Press <═╝'); readln;
  144. end.  (* tsunth.tst *)
  145.